package com.team.olympic.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import com.team.olympic.mapper.AdminMapper;
import com.team.olympic.pojo.Response;

@CrossOrigin
@RestController
public class AdminController {
    @Autowired
    private AdminMapper adminMapper;

    @PostMapping("/destroy")
    public Response<?> destroy() {
        adminMapper.deleteItemUser();
        adminMapper.deleteMatchUser();
        adminMapper.updateUserScore();
        return Response.success();
    }
}
